<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>专业数据处理平台</title>
    <meta name="description" content="这是一个 taskList 页面">
    <meta name="keywords" content="taskList">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="renderer" content="webkit">
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link rel="icon" type="image/png" href="${ctx}/assets/i/favicon.png">
    <link rel="apple-touch-icon-precomposed" href="${ctx}/assets/i/app-icon72x72@2x.png">
    <meta name="apple-mobile-web-app-title" content="Amaze UI" />
    <link rel="stylesheet" href="${ctx}/assets/css/amazeui.min.css" />
    <link rel="stylesheet" href="${ctx}/assets/css/admin.css">
    <link rel="stylesheet" href="${ctx}/assets/css/app.css">
    <link rel="stylesheet" type="text/css" href="${ctx}/assets/css/xcConfirm.css"/>

</head>

<body data-type="chart">
    <!--标题-->
    <div class="tpl-content-page-title">
        工作流系统--任务
    </div>
    <!--面包屑-->
    <ol class="am-breadcrumb">
        <li><a href="#" class="am-icon-home">首页</a></li>
        <li><a href="#">任务</a></li>
        <li class="am-active">任务列表</li>
    </ol>
    <div class="tpl-portlet-components">
        <div class="portlet-title">
            <div class="caption font-green bold">
                 任务列表
            </div>
            <div class="action" style="float: right;">
                <ul class="actions-btn">
                    <li class="blue" onclick="unifiedDeletion()">统一删除</li>
                </ul>
            </div>
        </div>
        <div class="tpl-block">
            <!--栅格化-->
            <div class="am-g">
                <div class="am-u-sm-12">
                        <table class="am-table am-table-striped am-table-hover table-main" id="taskTableList">
                            <thead>
                            <tr>
                                <th style="width: 34px"><input type="checkbox" id="checkAll"></th>
                                <th class="tHead">序号</th>
                                <th class="tHead">任务名称</th>
                                <th class="tHead">所属模型</th>
                                <th class="tHead">创建人</th>
                                <th class="tHead">简介</th>
                                <th class="tHead">操作</th>
                            </tr>
                            </thead>
                        </table>
                        <div class="am-cf am-center">
                                <div id="test1"style="text-align: center;"am-pagination="pagination_new" pagenumber="1" totalpage="6"></div>
                        </div>
                        <hr>
                </div>

            </div>

        </div>

    </div>


<script src="${ctx}/assets/js/jQuery/jquery-1.9.1.js"></script>
<script src="${ctx}/assets/js/jQuery/jquery.min.js"></script>
<script src="${ctx}/assets/js/common/config.js"></script>
<script src="${ctx}/assets/js/common/xcConfirm.js"></script>
<script src="${ctx}/assets/js/common/amazeui.min.js"></script>
<script src="${ctx}/assets/js/common/app.js"></script>
<script src="${ctx}/assets/js/task/taskList.js"></script>
<script src="${ctx}/assets/js/layer/layer.js"></script>
<script>
    $(function () {
        $.ajax({
            type: "POST",
            url: constUrl+"ws/task/list",
            dataType: "json",
            data: {
                operateType: "showAll",
                onePageCount: "10",
                currentPage: "1"
            },
            success: function (data) {
                addPageNum(data.result);
                addBox(data.result.tasks);
                paginationInit();
            }
        });
    });
    function  addPageNum(data ){
        console.log(data.pageNum)
        $('[am-pagination =pagination_new ]').attr("totalpage",data.pageNum);
    }
</script>
</body>

</html>